3 THE STONE-WEIERSTRASS APPROXIMATION THEOREM 137
is continuous. From that remark, it easily follows that for any subalgebra
A of <?£(£) (resp. #£(£)), the closure m of A in «£(E) (resp. «£(E)) is again
a subalgebra (see the proof of (5.4.1)).

We say that a subset A of #H(E) (resp. #C(E)) separates points of E if
for any pair of distinct points x, y in E, there is a function /e A such that

(7.3.1) (Stone- Weierstrass theorem) Let E be a compact metric space.
If a subalgebra
A of #R(E) contains the constant functions and separates
points ofE,
A is dense in the Banach space ^R(E).

In other words, if S is a subset of #R(E) which separates points, for any
continuous real-valued function /on E, there is a sequence (gn) of functions
converging uniformly to/, such that each gn can be expressed as & polynomial
in the functions of S, with real coefficients.

The proof is divided in several steps.
(7.3.1 .1) There exists a sequence of real polynomials («„) "which in the interval
[0, 1] is increasing and converges uniformly to «Jt .

Define un by induction, taking = 0, and putting
(7.3.1 .2)
«,n+1(0 = un(t) + i(f - «;(/)) for n ^ 1.
We prove by induction that un+1 ^ un and un(f) < ,* in [0, 1]. From (7.3.1 .2),
we see the first result follows from the second. On the other hand

- u
n+ j
and from un(t) < ^ we deduce i(\A + «n(0) < \A < L For each ^ e t°» !]»
the sequence (un(t)) is thus increasing and bounded, hence converges to

a limit v(t) (4.2.1) ; but (7.3.1 .2) yields / - v2(t) = 0 and as v(t) ^ 0, t?(0 = Ji-
As y is continuous and the sequence (un) is increasing, Dini's theorem (7.2.2)
proves that (un) converges uniformly to v.

(7.3.1.3) For any function fe A, |/| belongs to the closure A of A. on «R(E).
Let a= ||/||. By (7.3.1.1), the sequence of functions un(f2/a2), which
belong to A (by definition of an algebra), converges uniformly to(/2/a2)1/2 =
in E.